const express = require('express');
const router = express.Router();
const {server} = require("../../controllers");
const { verifyToken } = require("../verifyToken");


// 获取评论
router.post('/getComment', verifyToken, (req, res) => server.getCommentPage(req, res));
// 改变评论状态
router.post('/updateCommentStatus', verifyToken, (req, res) => server.updateCommentStatus(req, res));
// 删除评论
router.post('/deleteComment', verifyToken, (req, res) => server.deleteComment(req, res));
// 游客新增评论
router.post('/addComment', (req, res) => server.addComment(req, res));
//根据文章id获取评论
router.post('/getCommentByArticleId', (req, res) => server.getCommentByArticleId(req, res));
//根据回复id获取子评论
router.post('/getCommentByResId', (req, res) => server.getCommentByResId(req, res));
//评论的举报数加一
router.post('/complaintComment', (req, res) => server.complaintComment(req, res));


module.exports = router;